package com.white.bean;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * create table thumbsUp(
 * likeId int primary key AUTO_INCREMENT comment "点赞ID",
 * userId int comment "点赞用户ID",
 * foreign key(userId) REFERENCES user(userId) on delete cascade on update cascade,
 * beThumbsUpId int comment "被点赞图书或者评论ID",
 * type int not null default 0 comment "点赞的类型：默认0表示点赞图书，可取1表示点赞评论",
 * createTime TIMESTAMP not null default CURRENT_TIMESTAMP comment "点赞时间，默认当前时间戳"
 * );
 * 
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ThumbsUp {
    @TableId("likeId")
    private Long likeId;
    private Long userId, beThumbsUpId;
    private int type;
    private String createTime;

    public ThumbsUp(Long userId, Long beThumbsUpId, int type) {
        this.userId = userId;
        this.beThumbsUpId = beThumbsUpId;
        this.type = type;
    }
}
